﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Common;
using DataAccessLayer;

namespace VMS_REST_JSON_Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "RateMasterService" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select RateMasterService.svc or RateMasterService.svc.cs at the Solution Explorer and start debugging.
    public class RateMasterService : IRateMasterService
    {
        Master_Items_DB ObjMaster_Items_DB = null;

        public ArrayList GetMasterTypes()
        {
            return GenericUtility.GetDropDownData(GenericUtility.MASTERTYPES);
        }

        public ArrayList GetChargeCodes()
        {
            return GenericUtility.GetDropDownData(GenericUtility.CHARGECODES);

        }
        
        public ArrayList GetUnitCodes()
        {
            return GenericUtility.GetDropDownData(GenericUtility.UNITCODES);

        }

        public ArrayList GetDefaultUnitCodes()
        {
            return GenericUtility.GetDropDownData(GenericUtility.DEFAULTUNITCODES);

        }

        public ArrayList GetItemsByMasterType(string master_type)
        {

            return GenericUtility.GetItemsByMasterType(master_type);
        }

        public List<Master_Items> GetMasterItems(string master_type, string status)
        {
            bool local_status = Convert.ToBoolean(status);
            ObjMaster_Items_DB = new Master_Items_DB();
            return ObjMaster_Items_DB.GetMasterItems(master_type, local_status);

        }


    }
}
